# 游戏常量定义

# 屏幕尺寸
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600

# 游戏网格
GRID_SIZE = 30
GRID_WIDTH = 10
GRID_HEIGHT = 20

# 颜色定义
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
CYAN = (0, 255, 255)
MAGENTA = (255, 0, 255)
YELLOW = (255, 255, 0)
ORANGE = (255, 165, 0)
GRAY = (128, 128, 128)

# 方块形状定义
SHAPES = [
    [[1, 1, 1, 1]],  # I
    [[1, 1], [1, 1]],  # O
    [[0, 1, 0], [1, 1, 1]],  # T
    [[1, 0, 0], [1, 1, 1]],  # J
    [[0, 0, 1], [1, 1, 1]],  # L
    [[0, 1, 1], [1, 1, 0]],  # S
    [[1, 1, 0], [0, 1, 1]]   # Z
]

# 方块颜色
SHAPE_COLORS = [CYAN, YELLOW, MAGENTA, BLUE, ORANGE, GREEN, RED]

# 初始游戏参数
INITIAL_FALL_SPEED = 0.5  # 初始下落速度（秒/格）
MIN_FALL_SPEED = 0.05     # 最小下落速度
SPEED_INCREASE_RATE = 0.05  # 每升级减少的秒数

# 分数设置
SINGLE_LINE_SCORE = 100    # 消除单行分数
DOUBLE_LINE_SCORE = 300    # 消除双行分数
TRIPLE_LINE_SCORE = 500    # 消除三行分数
TETRIS_SCORE = 800         # 消除四行分数（俄罗斯方块）
SOFT_DROP_SCORE = 1        # 软降每格分数
HARD_DROP_SCORE = 2        # 硬降每格分数

# 等级设置
LINES_PER_LEVEL = 10       # 每升一级需要消除的行数